#ifndef SEMAPHORE_CPP11_H
#define SEMAPHORE_CPP11_H

class semaphore_c11
{
public:
	semaphore_c11();
	~semaphore_c11();

	void signal();
	void wait();
	bool try_wait(int timeOut);

private:
	struct Impl;                    // 前置声明实现类
	Impl* _pImpl;                    // 指向实现的指针
	unsigned long _count; // Initialized as locked.

};
#endif
